using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class web_pages_ajax_san_nhatuyendung : System.Web.UI.Page
{
    public DataTable resdtt;
    Common comm = new Common();
    protected void Page_Load(object sender, EventArgs e)
    {
        
        string ma_san = Request.QueryString["sid"];
        string sql = "  select * from NguoiTimViec_ho_so inner join Connguoi_nguoi on NguoiTimViec_ho_so.ma_nguoi = Connguoi_nguoi.ma_nguoi " +
                     " where ma_ho_so in ( select ma_ho_so_tim_viec from SanGiaoDich_Nguoi_tim_viec where  ma_san ='" + ma_san + "') ";


        string ma_tp = Request.QueryString["tpid"];

        if (ma_tp.Length > 0)
            sql += " and  ma_ho_so in (	select ma_ho_so from NguoiTimviec_thanh_pho_lam_viec	where ma_dia_chi = '" + ma_tp + "' )";
        
        string ma_chucdanh = Request.QueryString["chucdanhid"];
        if (ma_chucdanh.Length > 0)
            sql += " and  chuc_danh_mong_muon = '" + ma_chucdanh + "' ";

       

        resdtt = comm.getDataTable(sql);
    }
}
